home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Softdisk Supreme
/
Softdisk Supreme.iso
/
pc
/
DSK Files
/
0-49
/
SD023b.dsk
/
APPLOGIC.bas
< prev
next >
Wrap
BASIC Source File
|
2003-06-12
|
3KB
|
49 lines
5 REM WORD LOGIC
10 TEXT : HOME : GOSUB 300: GOSUB 400
15 HOME : VTAB 10: HTAB 5: INPUT "(P)LAY OR (E)NCODE? ";C$: IF C$ = "E" GOTO 200
20 PRINT : PRINT : HTAB 5: INPUT "START WITH WHAT NUMBER? (1 TO 50) ";N: IF N <1 OR N >50 THEN 20
22 ZX = N
25 FOR I = 1 TO N: READ A$: NEXT
30 D$ = "":A = 0: HOME
40 FOR N = 1 TO 5:B = ASC( MID$ (A$,N,1))
60 B = B -11 *(B >75) +15 *(B <76)
70 B(N) = B:D$ = D$ + CHR$(B): NEXT : PRINT "ENTER A 5 LETTER WORD OR X TO GIVE UP.": PRINT
80 A = A +1: INPUT C$: IF C$ = "X" THEN 170
90 IF LEN(C$) < >5 GOTO 80
100 CT = 0: FOR N = 1 TO 5:C(N) = ASC( MID$ (C$,N,1)): NEXT : IF C$ = D$ GOTO 160
110 FOR N = 1 TO 5: FOR M = 1 TO 5
120 IF B(N) = C(M) THEN CT = CT +1:C(M) = 0: GOTO 140
130 NEXT M
140 NEXT N
150 HTAB 10: VTAB ( PEEK(37)): PRINT " EQUALS ";CT: GOTO 80
160 PRINT "YOU GOT IT IN ";A;" GUESSES.": GOTO 180
170 PRINT "THE WORD IS ";D$
180 INPUT "PLAY AGAIN?";C$: IF LEFT$(C$,1) = "N" THEN PRINT : PRINT CHR$(4)"RUNMENU"
181 ZX = ZX +1
185 IF ZX >50 THEN RESTORE :ZX = 1
190 READ A$: GOTO 30
200 HOME : PRINT "TYPE A 5 LETTER WORD OR X TO QUIT."
210 INPUT "WHAT'S YOUR WORD?";A$:B$ = "": IF A$ = "X" GOTO 15
220 FOR N = 1 TO 5:B = ASC( MID$ (A$,N,1))
230 B = B +11 *(B <80) -15 *(B >79)
240 B$ = B$ + CHR$(B)
250 NEXT : PRINT A$;" = ";B$: GOTO 210
260 DATA QFORP,WFNVJ,MWZYO,NCZHY,DSTCE,ESTYR,NLMTY,MLCYD,QTCDE,ATLYZ,HSLWP,XPLYE
270 DATA FYOPC,BFTNV,GTPHD,ZAPYD,NSTWO,UPPAD,HLEPC,HZXLY,RYLED,FYHPO,PBFLW,DTDDJ,ECJDE,XLITX,UPWWJ,LITZX,WJYNS,NSTNV
280 DATA ZYTZY,CLCPC,GTGTO,LKFCP,EPPES,PIEZW,GTZWL,PLDPD,WPGPW,HSTNS,DLFNP,QWPDS,ZNPLY,DALCP,CTYRD,NLFDP,DSPWQ,NLYZP,APLCD,RCTYD
300 POKE 32,6: POKE 33,28: POKE 34,3: POKE 35,16: VTAB 4: INVERSE : FOR X = 1 TO 10
310 PRINT " ": NEXT : NORMAL
320 POKE 32,7: POKE 34,4: POKE 35,16: VTAB 5: FOR X = 1 TO 8: PRINT " ": NEXT
330 VTAB 6: HTAB 9: PRINT "APPLOGIC": VTAB 8: HTAB 6: PRINT "A WORD GAME BY"
340 VTAB 11: HTAB 4: PRINT "BEVERLY B. MARKELS"
350 FOR X = 1 TO 5000: NEXT : RETURN
400 TEXT : HOME : PRINT "INSTRUCTIONS"
410 PRINT "THE PURPOSE OF THIS GAME IS TO GUESS THECOMPUTER'S 5-LETTER WORD. FOR EACH WORDYOU GUESS, YOU WILL BE GIVEN THE NUMBER"
420 PRINT "OF CORRECT LETTERS IT CONTAINS. FOR INSTANCE:"
430 PRINT : PRINT " COMPUTER'S WORD YOUR GUESS SCORE": PRINT " PAUSE STORE 2": PRINT " FEELS LEAPS 3"
440 PRINT " FEELS SLEEP 4": PRINT " PEACH CHEAP 5"
450 PRINT "NOTICE ESPECIALLY HOW DOUBLE LETTERS ANDANAGRAMS ARE SCORED."
460 PRINT : PRINT "THERE ARE 50 WORDS IN THE PROGRAM; 1-20ARE EASIES, 21-40 ARE TOUGHIES, AND THE": PRINT "REST HAVE A SPECIAL RELATIONSHIP - SEE"
470 PRINT "IF YOU CAN FIND IT. LISTING THE PROGRAMWON'T HELP SINCE THE WORDS ARE ENCODED, BUT IF YOU GUESS ALL 50 WORDS, YOU CAN"
480 PRINT "TAKE THE (E)NCODE OPTION AND ENTER YOUR OWN WORDS. PUT THE ENCODED RESULTS IN"
490 INPUT "THE LINES 260+. PRESS RETURN TO PLAY.";A$: RETURN